package com.lastcrdg.testmvp.login;

import android.os.Handler;

import com.lastcrdg.testmvp.BasePresenter;

/**
 * author：liluo
 * e-mail：lastcrazysun@163.com
 * company：cusc
 * date：2017/8/17 17:44
 * description：
 */

public class LoginPresenterImp extends BasePresenter<LoginActivity> implements ILoginPresenter {

    @Override
    public void login(String name, String pwd) {
        final ILoginActivity view = getView();
        if (view == null){
            return;
        }
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                view.onSuccess("login success!");
            }
        }, 2000);
    }
}
